﻿Imports OMANE.Common.UI
Imports System.Windows.Data
Imports System.Windows.Media.Imaging

Public Class NomTableConverter
    Implements IValueConverter

    Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
        If Not value Is Nothing Then
            Dim nomTableSAS As String = DirectCast(value, String)
            Return Right(nomTableSAS, nomTableSAS.Length - InStr(nomTableSAS, "."))
        Else
            Return Nothing
        End If
    End Function

    Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
        Return "libenc." & value
    End Function
End Class